Minimum Obstacle Removal To Reach Corner - Leetcode 2290 - Python